package com.bestom.waterquality.logic;

import android.content.Context;
import android.view.View;
import android.widget.EditText;
import android.widget.Spinner;

import com.bestom.waterquality.R;

/**
 * 232 设置
 */
public class Two32Set {

    public static void setDataAndListen(Context context, View view){

        Spinner initiateMode1 = view.findViewById(R.id.initiate_mode_1);
        Spinner baudRate1 = view.findViewById(R.id.baud_rate_1);
        Spinner dataBits1 = view.findViewById(R.id.data_bits_1);
        Spinner parityBits1 = view.findViewById(R.id.parity_bits_1);
        Spinner stopBits1 = view.findViewById(R.id.stop_bits_1);

        Spinner initiateMode2 = view.findViewById(R.id.initiate_mode_2);
        Spinner baudRate2 = view.findViewById(R.id.baud_rate_2);
        Spinner dataBits2 = view.findViewById(R.id.data_bits_2);
        Spinner parityBits2 = view.findViewById(R.id.parity_bits_2);
        Spinner stopBits2 = view.findViewById(R.id.stop_bits_2);

        EditText pollingCycle = view.findViewById(R.id.polling_cycle);
        EditText overtime = view.findViewById(R.id.overtime);
        EditText failTime = view.findViewById(R.id.fail_time);
        pollingCycle.setText("200");
        overtime.setText("200");
        failTime.setText("60");
    }
}
